import { commonTableOptions } from '@/utils/util'

export const tableOption = function () {
  let self = this
  return {
    ...commonTableOptions,
    // height: self?.documentHeight - 450,
    searchMenuSpan: 18,
    menuWidth: 300,
    menu: false,
    header: true,
    addBtn: false,
    addBtnText: '新增',
    editBtn: false,
    delBtn: false,
    viewBtn: false,
    searchLabelWidth: 120,
    column: [

      {
        label: '航运公司名称',
        prop: 'p1',
        search: true,
        overHidden: true,
      },
      {
        label: '船舶名称',
        prop: 'p2',
        search: true,
        overHidden: true,
      },
      {
        label: '船舶编号',
        prop: 'p3',
        type: 'date',
        overHidden: true,
      },
      {
        label: '海事机构',
        search: true,
        prop: 'p4',
      },
      {
        label: '预警内容',
        prop: 'p5',
      },
      {
        label: '预警类型',
        search: true,
        prop: 'p6',
        type: 'select',
        dicData: [
          {label:'AIS信号中断', value:'AIS信号中断'},
          {label:'安检滞留', value:'安检滞留'}
        ],
        filterable: true,
      },
      {
        label: '预警发生时间',
        prop: 'p7',
        overHidden: true,
        search: true,
        type: 'date'
      },
    ]
  }
}

export const tableOption2 = function () {
  let self = this
  return {
    ...commonTableOptions,
    // height: self?.documentHeight - 450,
    searchMenuSpan: 12,
    menuWidth: 300,
    menu: true,
    header: true,
    addBtn: false,
    addBtnText: '新增',
    editBtn: false,
    delBtn: false,
    viewBtn: false,
    searchLabelWidth: 120,
    cellBtn: true,
    addRowBtn: true,
    editRowBtn: true,
    column: [
      {
        label: '问题描述',
        prop: 'p1',
        cell: true,
      },
    ]
  }
}